package com.menhai.personmanagement.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.menhai.personmanagement.entity.PersonnelStatistics;
import com.menhai.personmanagement.entity.co.PersonnelStatisticsCo;
import com.menhai.personmanagement.mapper.PersonnelStatisticsMapper;

@Service
public class PersonnelStatisticsService {
	
	@Autowired
	private PersonnelStatisticsMapper PersonnelStatisticsMapper;

	/*public List<PersonnelStatistics> selectQuery(PersonnelStatistics PersonnelStatistics) {
		return PersonnelStatisticsMapper.selectQuery(
				PersonnelStatistics.getName(),
				PersonnelStatistics.getSex(),
				PersonnelStatistics.getAgeStart(),
				PersonnelStatistics.getAgeEnd(),
				PersonnelStatistics.getIdnumber(),
				PersonnelStatistics.getTelephony(),
				PersonnelStatistics.getState()
				);
	}*/
	
	public IPage<PersonnelStatistics> selectQuery(PersonnelStatisticsCo PersonnelStatistics){
        Page<PersonnelStatistics> page = new Page<>(PersonnelStatistics.getPageIndex(),PersonnelStatistics.getPageSize());
        return PersonnelStatisticsMapper.selectQuery(page,PersonnelStatistics);
    }
	
	public List<PersonnelStatistics> selectQueryExcel(PersonnelStatistics PersonnelStatistics) {
	return PersonnelStatisticsMapper.selectQueryExcel(PersonnelStatistics);
	}
}
